<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Access-Control-Allow-Origin" content="www.huizeead.com">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <meta name="format-detection" content="telephone=no,email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="pragma" content="no-cache" />
    <meta name="x5-orientation" content="portrait">
    <title></title>
    <link rel="stylesheet" href="css/animate.min.css" />
    <link rel="stylesheet" href="css/swiper.min.css"/>
    <link rel="stylesheet" href="css/style.css" />
    <script src="js/jquery-2.1.4.min.js"></script>
    <!-- Swiper JS -->
    <script src="js/swiper-3.4.2.min.js"></script>
    <script src="js/swiper.animate.min.js"></script>
</head>
<body>
<div class="bcon">
    <div class="music an">
        <img src="images/yinyue.png" alt="" class="music1" />
        <!--<img src="images/music2.png" alt="" class="music2" />-->
        <audio id="music-c" src="images/music.mp3" loop></audio>
    </div>
</div>



<!-- Swiper -->
<div class="swiper-container">
    <div class="swiper-wrapper">

        <div class="swiper-slide">
            <div class="container">
                <img src="images/B03.jpg" alt="" class="bg" />
            </div>
        </div>
    </div>
</div>


<script>
    //一般情况下，可以自动播放了
    document.getElementById('music-c').play();
    //必须在微信Weixin JSAPI的WeixinJSBridgeReady才能生效
    document.addEventListener("WeixinJSBridgeReady", function() {
        document.getElementById('music-c').play();
    }, false);
    function getMusic() {
        var audio_Btn = $('.music');
        var music = document.getElementById('music-c');
        // $('.qd').click(function(){
        //     music.play();
        // });
        audio_Btn.click(function() {

            if (audio_Btn.is('.an')) {
                music.pause();
                audio_Btn.removeClass('an');
                $('.music2').hide();
            } else {
                music.play();
                audio_Btn.addClass('an');
                $('.music2').show();
            }

        });

    }


</script>


<!-- Initialize Swiper -->
<script>

    function getQueryString(name) {

        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    }


    $(function () {
        var data_a = getQueryString("id");
        if(data_a=="1"||data_a==1)
            $(".bg").attr("src","images/B03.jpg");

        if(data_a=="2"||data_a==2)
            $(".bg").attr("src","images/gi02.jpg");

        getMusic()

    })

</script>

</body>
</html>